<?php

//database menu işlemi olmadı...dene dene dene...

class Menu_model extends CI_Model{
	
	function menu_list(){
		$this->db->select('*');
		$this->db->from('module AS  M');
		$this->db->join('module_parents AS MP', 'M.module.id = MP.module.id');
		$this->db->where('M.module_id=1');
		
		$this->db->join('module AS M', 'module_parents AS MP', 'M.module.id = MP.module.id', 'M.module_id=1');
		
	$query = $this->db->get();
    foreach ($query->result_array() as $row) {
        $results = $row;
    }
	}

// 	function menu_list(){
// 		$query = $this->db->get('module');
// 		foreach ($query->result() as $row)
// 		{
// 			echo $row->module_name;
// 		}
// 	}
}